home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / AmigaTalk / examples / file.st < prev    next >
Encoding:
Text File  |  2004-01-31  |  385 b   |  17 lines

  1. Class Main
  2. [
  3.    main      | f g |
  4.       f <- File new ; open: 'file.st'.
  5.       g <- File new ; open: 'foo' for: 'w'.
  6.       f do: [:x | g write: x reversed].
  7.       g <- File new ; open: 'foo' for: 'r'.
  8.       g do: [:x | x print].
  9.       f modeCharacter.
  10.       f first print.
  11.       10 timesRepeat: [ f next print ].
  12.       (f at: 2) print.
  13.       f currentKey print.
  14.       f size print.
  15. ]
  16.  
  17.